#ifndef GULLENGINE_APIFACTORY_H
#define GULLENGINE_APIFACTORY_H

#include "GUIAPI.h"
#include "API3D.h"
#include "InputAPI.h"

#include "GLUTGUIWrapper.h"
#include "OpenGLWrapper.h"
#include "GLUTInputWrapper.h"



namespace gull {
	namespace core {
		class APIFactory
		{
			
		public:
			static inline const GUIAPI* getGUIAPI(const char* name);
			static inline API3D* getAPI3D(const char* name);
			static inline InputAPI* getInputAPI(const char* name);

		};
		
		const GUIAPI*
		APIFactory::getGUIAPI(const char* name)
		{
			if(!strcmp(name, "glut"))
				return new GLUTGUIWrapper();
			return NULL;
		}
		
		API3D*
		APIFactory::getAPI3D(const char* name)
		{
			if(!strcmp(name, "opengl"))
				return new OpenGLWrapper();
			return NULL;
		}
		
		
		InputAPI*
		APIFactory::getInputAPI(const char* name)
		{
			if(!strcmp(name, "glut"))
				return new GLUTInputWrapper();
			return NULL;
		}
		
		
		
	}
}

#endif